<?php
require("class.phpmailer.php");
function smtp_mail ($smtp_server,$sendto_email, $subject, $body, $to_user,$from_email,$smtp_password,$from_user) {
$mail = new PHPMailer();
$mail->IsSMTP(); 
$mail->Host = $smtp_server; 
$mail->SMTPAuth = true; 
$mail->Username = "system@ux168.com"; 
$mail->Password = $smtp_password; 
$mail->From = $from_email; 
$mail->FromName = $from_user;
$mail->CharSet = "GB2312"; 
$mail->Encoding = "base64";
$mail->AddAddress($sendto_email,$to_user); 
$mail->AddReplyTo($from_email,"system_admin");
$mail->IsHTML(true); 
$mail->Subject = $subject;
$mail->Body = $body;
$mail->Send();
}
$file="$argv[3]";
$emailcontents=file_get_contents($file);
$mailfile=str_replace("\n","<Br>",$emailcontents);
#smtp_mail('mail.ux168.com',"$argv[1]", "$argv[2]", "$mailfile", 'admin','systemreport@ux168.com','abc,.78920', 'US212');

smtp_mail('192.168.0.185',"$argv[1]", "$argv[2]", "$mailfile", "admin","systemreport@ux168.com","abc,.78920", "UX168");
?>
